package thread;

class MyThread11 extends Thread{
    @Override
    public void run(){
        while(true){
            System.out.println("111");
            try {
                Thread.sleep(1000);
            } catch (InterruptedException e) {
                throw new RuntimeException(e);
            }
        }
    }
}
public class ThreadDemo11 {
    public static void main(String[] args) throws InterruptedException {
        MyThread11 t1 = new MyThread11();
//        t1.start();
        t1.run();
        // run() 和start的区别
        while (true){
            System.out.println("222");
            Thread.sleep(1000);
        }
    }
}
